import request from '@/utils/request'

// 查询列表
export function listOfCategoryId(categoryId) {
  return request({
    url: '/station/product/list/' + categoryId,
    method: 'get'
  })
}

// 查询
export function info(id) {
  return request({
    url: '/station/product/' + id,
    method: 'get'
  })
}

// 新增产品
export function add(data) {
  return request({
    url: '/station/product',
    method: 'post',
    data: data
  })
}

// 修改产品
export function edit(data) {
  return request({
    url: '/station/product',
    method: 'put',
    data: data
  })
}

// 删除产品
export function del(id) {
  return request({
    url: '/station/product/' + id,
    method: 'delete'
  })
}
